import request from '@/utils/request'

// 创建巡检标准
export function createStandard(data) {
  return request({
    url: '/polling/standard/create',
    method: 'post',
    data: data
  })
}

// 更新巡检标准
export function updateStandard(data) {
  return request({
    url: '/polling/standard/update',
    method: 'put',
    data: data
  })
}

// 删除巡检标准
export function deleteStandard(id) {
  return request({
    url: '/polling/standard/delete?id=' + id,
    method: 'delete'
  })
}

// 获得巡检标准
export function getStandard(id) {
  return request({
    url: '/polling/standard/get?id=' + id,
    method: 'get'
  })
}

// 获得巡检标准分页
export function getStandardPage(query) {
  return request({
    url: '/polling/standard/page',
    method: 'get',
    params: query
  })
}

export function getStandardMy(query) {
  return request({
    url: '/polling/standard/my',
    method: 'get',
    params: query
  })
}


// 导出巡检标准 Excel
export function exportStandardExcel(query) {
  return request({
    url: '/polling/standard/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获得巡检标准分页
export function getCategoriesList(query) {
  return request({
    url: '/abu/polling-categories/page',
    method: 'get',
    params: query
  })
}


export function getImeiTypeList() {
  return request({
    url: '/abu/polling-categories/type',
    method: 'get'
  })
}

export function getImeiInfo(data) {
  return request({
    url: '/abu/polling-categories/emq/'+data,
    method: 'get'
  })
}

export function getImeiInfoBz(data) {
  return request({
    url: '/abu/polling-categories/emqbz/'+data,
    method: 'get'
  })
}

export function getUserList(data) {
  return request({
    url: '/abu/polling-categories/user',
    method: 'get',
    params: data
  })
}
